<?
include_once('top.inc');
?>

<form action="<? echo $info['url']; ?>" method="post" enctype="multipart/form-data">
<table width="100%" border="0" cellspacing="5" cellpadding="5">
  <tr>
   
    
      
      <br /> <td width="51%"><strong>Название файла:</strong><br />
    <input name="name" id="name" type="text" class="inmed" value="<? echo $info['name']; ?>" />
      <i>Только латинские буквы и цифры! Без пробелов.</i><br /><br />


<strong>Родительская категория: </strong>
<select name="parent">
<?
$z = mysql_query("select id,title from services where `parent` is null or `parent` =0");

echo  '<option value="NULL"';
	if ($info['parent']=='') echo ' selected';
	echo '>Не указывать</option>';

while ($t =mysql_fetch_assoc($z)){
	echo  '<option value="'.$t['id'].'"';
	if ($info['parent']==$t['id']) echo ' selected';
	echo '>'.$t['title'].'</option>';
}	
?>
    
    </select><br />

          </td>
    <td width="49%">

    
<label>    <input name="show" type="checkbox" value="1" checked="checked" />
          Отображать на сайте</label><br /><br />

      
      </td>
  </tr>
  <tr>
    <td><strong>Название:</strong><br />
      <textarea name="title" class="med"><? echo $info['title']; ?></textarea></td>
    <td>

<br />

    

		</td>
  </tr>
  <tr>
    <td>      </td>
    <td valign="top">
    

    </td>
  </tr>
  <tr>
    <td colspan="2"><strong>Контент:</strong>
    <script type="text/javascript">

function FCKeditor_OnComplete( editorInstance )
{
	editorInstance.Events.AttachEvent( 'OnBlur'	, FCKeditor_OnBlur ) ;
	editorInstance.Events.AttachEvent( 'OnFocus', FCKeditor_OnFocus ) ;
}

function FCKeditor_OnBlur( editorInstance )
{
	editorInstance.ToolbarSet.Collapse() ;
}

function FCKeditor_OnFocus( editorInstance )
{
	editorInstance.ToolbarSet.Expand() ;
}

	</script>
    <?$oFCKeditor = new FCKeditor('content') ;
$oFCKeditor->Height = '500';
$oFCKeditor->BasePath = '/7ert54/fckeditor/';
$oFCKeditor->Value = stripslashes($info['content']);
$oFCKeditor->Create() ; 
?>




</td>
    
  </tr>
 <tr><td>

 
 
 
 </td><td></td></tr>
</table>
<input type="submit" value="Сохранить">
</form>
